package com.neusoft.resturant.controller;

import com.neusoft.resturant.entity.Student;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class FirstController {
@GetMapping("/student/show")
    //localhost:8081/api/student/show
    public Student show(){
    System.out.println("学生介绍");
        Student student =new Student();
        student.setSno("21001010535");
        student.setSex("女");
        student.setName("孙颖凤");
        return  student;
    }
    @GetMapping("/student/show1")
    public Student show1(){
        System.out.println("学生介绍");
        Student student =new Student();
        student.setSno("21001010535");
        student.setSex("女");
        student.setName("孙颖凤（1）");
        return  student;
    }
}
